/**
 * 
 */
package com.yuedao.sender.model;

import javax.persistence.Entity;

import cn.ydx.protobuf.OTIpcDef;

/**
 * @author Jason Biao
 *
 *网约车车辆里程信息接口
 */
@Entity
public class BaseInfoVehicleTotalMile extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4893804185970480956L;

	private int address;

	private String vehicleNo;

	private String totalMile;

	public int getAddress() {
		return address;
	}

	public void setAddress(int address) {
		this.address = address;
	}

	public String getVehicleNo() {
		return vehicleNo;
	}

	public void setVehicleNo(String vehicleNo) {
		this.vehicleNo = vehicleNo;
	}

	public String getTotalMile() {
		return totalMile;
	}

	public void setTotalMile(String totalMile) {
		this.totalMile = totalMile;
	}

	  public static OTIpcDef.BaseInfoVehicleTotalMile convert(BaseInfoVehicleTotalMile data){
	        OTIpcDef.BaseInfoVehicleTotalMile item = OTIpcDef.BaseInfoVehicleTotalMile.newBuilder()
	                .setCompanyId(data.getCompanyId())
	                .setAddress(data.getAddress())
	                .setVehicleNo(data.getVehicleNo())
	                .setTotalMile(Float.valueOf(data.getTotalMile()))
	                .setFlag(data.getFlag())
	                .setUpdateTime(Long.valueOf(data.getUpdateTime()))
	                .build();

	        return item;
	    }
}
